<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title><%= meta.title %></title>
	<meta name="keywords" content="<%= meta.keywords %> - <%= meta.title %>" />
	<meta name="description" content="<%= meta.description %>" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" />
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<link rel="stylesheet" href="<%= meta.hostName %>/css/public/zui.min.css" />
	<link rel="stylesheet" href="<%= meta.hostName %>/css/public/font-awesome.min.css" />
	<link rel="stylesheet" href="<%= meta.hostName %>/css/public/element-ui.min.css" />
	<link rel="stylesheet" href="<%= meta.hostName %>/css/public/display.min.css" />
	<link rel="stylesheet" href="<%= meta.hostName %>/css/public/tools.css" />
	<link rel="stylesheet" href="<%= meta.hostName %>/css/detill.css" />
	<script>
		window.configData = {
			searchName: '<%= searchName %>',
			searchResult: <%- JSON.stringify(searchResult) %>,
		}
	</script>
</head>
<body>
	<div id="app">
		<!-- 头部导航 -->
		<div time="1579870527514" class="header text-center">
			<div class="container">
				<div class="pt10 pb10">
					<div class="pub-flex">
						<div class="logo pub-flex">
							<a class="block" href="<%= meta.hostName %>">
								<img class="block" src="<%= meta.hostName %>/upload/logo/logo.png" alt="网站logo图片" />
							</a>
						</div>
						<div class="nav-type pl20">
							<!-- pc导航栏 -->
							<div class="pc-nav">
								<% nav.forEach((item, index) => { %>
								<a class="<% if(item.active) { %>active<% } else { %> <% } %>" href="<%= meta.hostName %><%= item.link %>"><%= item.name %></a>
								<% }) %>
							</div>
							<!--  -->
						</div>
						<div class="pub-flex1"></div>
						<div class="search">
							<!-- 搜索 -->
							<div id="so-box">
								<div style="width: 100%;" class="input-group">
								  	<input id="soVal" onchange="window.goSearch();" type="text" class="form-control">
							  		<span class="input-group-btn">
								    	<button onclick="window.goSearch();" class="btn btn-default" type="button">
											<i class="icon-search"></i>
								    	</button>
								  	</span>
								</div>
							</div>
							<!--  -->
						</div>
						<div class="operate pub-flex ml10">
							<div onclick="window.location.href='<%= meta.hostName %>/type.html'" class="btn-ico pr10 pl10 pub-flex pointer">
								<i class="fa fa-list"></i>
							</div>
							<% if(!isLogin) { %>
							<div id="showLoginBtn" class="btn-ico pr10 pl10 pub-flex pointer" data-toggle="modal" data-target="#user-modal">
								<i class="fa fa-user"></i>
							</div>
							<% }else{ %>
							<div class="dropdown pull-left">
								<div data-toggle="dropdown" class="pub-flex user-pop pr10 pl10 pub-jc-center dropdown-toggle btn-ico">
									<i class="fa fa-user fa-1x"></i>
								</div>
								<div class="dropdown-menu pull-right">
									<div style="width: 230px;" class="pub-flex link text-center">
										<div class="pub-flex pub-flex1 pub-jc-center pointer" onclick="window.location.href='<%= meta.hostName %>/user.html'">
											<div class="btn-ico">
												<i class="fa fa-user"></i>
											</div>
											<div>
												<p class="text-center">个人中心</p>
											</div>
										</div>
										<div>|</div>
										<div class="pub-flex pub-flex1 pub-jc-center pointer" onclick="window.userLogout();">
											<div class="btn-ico">
												<i class="fa fa-sign-in"></i>
											</div>
											<div>
												<p class="text-center">注销登录</p>
											</div>
										</div>
									</div>
								</div>
							</div>
							<% } %>
							<div id="hisCon" class="dropdown pl10 pull-left">
								<div data-toggle="dropdown" onclick="window.changeHisState();" class="pub-flex user-pop pub-jc-center dropdown-toggle btn-ico">
									<i class="fa fa-history fa-1x"></i>
								</div>
								<div style="width: 300px;" class="dropdown-menu pull-right">
									<div time="1579846597751" class="history pl10 pr10 pt10 pb10">
										<div class="header pb10">
											<div class="pub-flex">
												<span class="pub-flex1 text-left">历史记录</span>
												<span onclick="window.emptyHistory();" class="pointer">清空</span>
											</div>
										</div>
										<div class="pt10 his-list">
											<!-- 历史记录列表 -->
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- mobile导航栏 -->
				<div class="mobile-nav ov-x-a ov-y-h" style="white-space: nowrap">
					<% nav.forEach((item, index) => {  %>
					<a class="<% if(item.active) { %>active<% } else { %> <% } %>" href="<%= meta.hostName %><%= item.link %>"><%= item.name %></a>
					<% }) %>
				</div>
				<!--  -->
			</div>
		</div>
		<!-- 广告 -->
		<% if(mealList.length){ %>
		<div class="container column-margin">
			<div class="card pl10 pr10 pb10 pt10">
				<div>
					<% mealList.forEach((item) => {  %>
					<div>
						<a href="<%= item.link %>">
							<img style="max-width: 100%;" src="<%= item.path %>" alt="" />
						</a>
					</div>
					<% }) %>
				</div>
			</div>
		</div>
		<% } %>
		<!-- 搜索结果 -->
		<div class="column-margin container cart-item">
			<div class="card pl10 pr10 pb10 pt10">
				<div class="cart-title row-col">
					<i class="fa fa-film"></i>
					<span>与 “<strong style="color: #f50505;" v-html="searchName"></strong>” 相关的影片</span>
				</div>
				<% if(searchResult.list.length){ %>
				<div class="mt10">
					<div v-for="item in searchResult.list" class="link pub-flex pub-ai-center row-col detill-info pub-ai-start">
						<div class="detill-cover">
							<a :href="'<%= meta.hostName %>/play/' + item._id + '.html'" class="row-item pr lazy" :style="{backgroundImage: 'url(' + item.videoImage + ')'}">
								<i class="play-ico"></i>
							</a>
						</div>
						<div class="pub-flex1 ov-x-h">
							<div>
								<div class="detill-row pr">
									<ul>
										<li>
											<h2 class="text-ellipsis word-wrap"><a style="color: #f50505;" :href="'<%= meta.hostName %>/play/' + item._id + '.html'">{{ item.videoTitle }}</a></h2>
										</li>
										<li>
											<p style="color: #409EFF;"><span class="labels">状态：</span>{{ item.remind_tip }}</p>
										</li>
										<li>
											<p><span class="labels">导演：</span>{{ item.director }}</p>
										</li>
										<li>
											<p class="ov-x-h pub-flex"><span class="labels">主演：</span><span class="in-block pub-flex1 ov-x-h text-ellipsis word-wrap">{{ item.performer }}</span></p>
										</li>
										<li>
											<div>
												<span class="labels hidden-md-and-down">类型：</span><a :href="'<%= meta.hostName %>/type.html?pid=' + item.video_type._id">{{ item.video_type.name }}</a>
												<el-divider direction="vertical"></el-divider>
												<span class="labels hidden-md-and-down">语言：</span><a :href="'<%= meta.hostName %>/type.html?language=' + item.language">{{ item.language }}</a>
												<el-divider direction="vertical"></el-divider>
												<span class="labels hidden-md-and-down">地区：</span><a :href="'<%= meta.hostName %>/type.html?sub_region=' + item.sub_region">{{ item.sub_region }}</a>
												<el-divider direction="vertical"></el-divider>
												<span class="labels hidden-md-and-down">时间：</span><a :href="'<%= meta.hostName %>/type.html?rel_time=' + item.rel_time">{{ item.rel_time }}</a>
											</div>
										</li>
										<li style="padding-bottom: 0px;">
											<div class="mt10" style="padding-bottom: 0;">
												<a class="btn btn-primary mr10" :href="'<%= meta.hostName %>/play/' + item._id + '.html'">点击播放</a>
												<a class="btn btn-danger " :href="'<%= meta.hostName %>/detill/' + item._id + '.html'">查看详情</a>
											</div>
										</li>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<div class="ov-y-h ov-x-a text-center pt20 pb10">
						<div>
							<el-pagination
								background
								layout="prev, pager, next"
								v-bind:page-size="10"
								v-bind:current-page="searchResult.page"
								v-on:current-change="changePage"
								v-bind:total="searchResult.total">
							</el-pagination>
						</div>
					</div>
				</div>
				<% }else{ %>
				<div class="pb20 pt20">
					<div class="container column-margin cart-item">
						<div>
							<div class="text-center pub-flex pub-jc-center pub-ai-center" style="padding: 200px 0;">
								<div>
									<div class="text-center">
										<i class="fa fa-exclamation-triangle fa-5x" style="color: #F56C6C;"></i>
									</div>
									<div class="text-center">没有搜索到 “{{ searchName }}” 相关的影片</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<% } %>
			</div>
		</div>
		<!-- 版权 -->
		<div class="container column-margin pb20">
			<div class="text-center pb20 pt20" style="font-size: 14px;color: #666;"><%- footer %></div>
		</div>
		<!-- 返回顶部 -->
		<div class="tipFooter">
			<div>
				<button class="el-btn" id="goTopBtn" title="返回顶部">
					<i class="icon icon-rocket"></i>
				</button>
			</div>
			<div class="mt10">
				<button class="el-btn btn-share" title="分享">
					<i class="icon icon-node"></i>
				</button>
			</div>
		</div>
		<% if(!isLogin) { %>
		<!-- 登录框 -->
		<div id="user-modal" class="modal fade">
			<div class="modal-dialog modal-sm">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
						<h4 class="modal-title">登录/注册</h4>
					</div>
					<div class="modal-body">
						<ul class="nav nav-tabs">
							<li class="active"><a data-tab href="#tabContent1">登录</a></li>
							<li><a data-tab href="#tabContent2">注册</a></li>
						</ul>
						<div class="tab-content">
							<div class="tab-pane active" id="tabContent1">
								<div>
									<div class="input-control has-icon-left mt10">
										<input id="login-un" type="text" class="form-control" placeholder="用户名">
										<label for="login-un" class="input-control-icon-left"><i class="icon icon-user"></i></label>
									</div>
									<div class="input-control has-icon-left mt10">
										<input id="login-pw" type="text" class="form-control" placeholder="密码">
										<label for="login-pw" class="input-control-icon-left"><i class="icon icon-lock"></i></label>
									</div>
									<div class="mt10 text-right">
										<button onclick="window.loginUser();" id="userLoginBtn" class="btn btn-success" type="button">登录</button>
									</div>
								</div>
							</div>
							<div class="tab-pane" id="tabContent2">
								<div>
									<div class="input-control has-icon-left mt10">
										<input id="reg-nn" type="text" class="form-control" placeholder="昵称">
										<label for="reg-nn" class="input-control-icon-left"><i class="icon icon-info"></i></label>
									</div>
									<div class="input-control has-icon-left mt10">
										<input id="reg-un" type="text" class="form-control" placeholder="用户名">
										<label for="reg-un" class="input-control-icon-left"><i class="icon icon-user"></i></label>
									</div>
									<div class="input-control has-icon-left mt10">
										<input id="reg-pw" type="text" class="form-control" placeholder="密码">
										<label for="reg-pw" class="input-control-icon-left"><i class="icon icon-lock"></i></label>
									</div>
									<div class="input-control has-icon-left mt10">
										<input id="reg-pw2" type="text" class="form-control" placeholder="确认密码">
										<label for="reg-pw2" class="input-control-icon-left"><i class="icon icon-lock"></i></label>
									</div>
									<div class="mt10 text-right">
										<button onclick="window.regUserInfo();" id="userRegBtn" class="btn btn-primary" type="button">注册</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<% } %>
	</div>
	<!-- 公共js -->
	<script src="<%= meta.hostName %>/js/public/jquery.min.js"></script>
	<script src="<%= meta.hostName %>/js/public/zui.min.js"></script>
	<script src="<%= meta.hostName %>/js/public/vue.min.js"></script>
	<script src="<%= meta.hostName %>/js/public/element-ui.min.js"></script>
	<script src="<%= meta.hostName %>/js/public/jquery.cookie.min.js"></script>
	<script src="<%= meta.hostName %>/js/public/jquery.lazyload.min.js"></script>
	<script src="<%= meta.hostName %>/js/public/clipboard.min.js"></script>
	<script src="<%= meta.hostName %>/js/public/public.js"></script>
	<script src="<%= meta.hostName %>/js/search/search.js"></script>
	<!-- 统计，广告等 -->
	<%- publicCode %>
</body>
</html>